const sidKey = "hccm_user_sid"
const userCodeKey = "hccm_user_code"
const userKey = "hccm_user"
const userIdKey = "hccm_user_id"
const userCcIdKey = "hccm_user_cc_id"
const wxOpenIdKey = "hccm_wx_openid"
const avator = "avator"
const wxSocialIdKey = "hccm_wx_socialid"
const offsetTop = "hccm_woffset_top"
const offsetHeight = "hccm_woffset_height"
const uplodVideoUrl = "uplod_video_url"
const injectionInfo = "hccm_injection_info"
const chooseContent = "hccm_choose_content"
const areaList = "area_list"
const userPhone = "user_phone"
const userHospId = "user_hosp_id"
const phoneToken = "phone_token"
const examinationId = "examination_id"
const currentStudent = "current_student"
const base64Image = "base64Image"
const tempFilePath = "tempFilePath"
const activeExport = "active_export"
const toNewUrl = "to_new_url"
const personType = "person_type"
const uploadVideoId = "upload_video_id"
const videoIndo = "video_indo"
const DownloadVideoList = "download_video_list"
const analysisValue = "analysis_value"
const analysisDetailsValue = "analysis_details_value"
const QRInfo = "QR_info"
const chooseInspectId = "choose_inspect_id"
const examTime = "exam_time"
const judge = "judge"

//当前SessionId
const getSessionId = function () {
  var value = uni.getStorageSync(sidKey)
  return value
}

//当前SessionId
const setSessionId = function (value) {
  uni.setStorageSync(sidKey, value)
}

//当前账号的code
const getUserCode = function () {
  var value = uni.getStorageSync(userCodeKey)
  return value ? value : ""
}

//当前账号code
const setUserCode = function (value) {
  uni.setStorageSync(userCodeKey, value)
}

//当前用户实体
const getUser = function () {
  var value = uni.getStorageSync(userKey)
  return value ? value : ""
}

//当前用户实体
const setUser = function (value) {
  uni.setStorageSync(userKey, value)
}

// 设置省市区列表
const setAreaList = function (value) {
  uni.setStorageSync(areaList, value)
}

// 获取省市区列表
const getAreaList = function (value) {
  var value = uni.getStorageSync(areaList)
  return value ? value : ""
}

//当前用户Id
const getUserId = function () {
  var value = uni.getStorageSync(userIdKey)
  return value ? value : ""
}

//当前用户Id
const setUserId = function (value) {
  uni.setStorageSync(userIdKey, value)
}

//当前用户 手机号
const setUserPhone = function (value) {
  uni.setStorageSync(userPhone, value)
}

//当前用户 手机号
const getUserPhone = function () {
  var value = uni.getStorageSync(userPhone)
  return value ? value : ""
}

//当前用户 医院id
const setUserHospId = function (value) {
  uni.setStorageSync(userHospId, value)
}

//当前用户 医院id
const getUserHospId = function () {
  var value = uni.getStorageSync(userHospId)
  return value ? value : ""
}

//当前用户ccUserId
const getCcUserId = function () {
  var value = uni.getStorageSync(userCcIdKey)
  return value ? value : ""
}

//当前用户ccUserId
const setCcUserId = function (value) {
  uni.setStorageSync(userCcIdKey, value)
}

//微信的openid
const getWxOpenId = function () {
  var value = uni.getStorageSync(wxOpenIdKey)
  return value
}

//微信的openid
const setWxOpenId = function (value) {
  uni.setStorageSync(wxOpenIdKey, value)
}

//手机号token
const getPhoneToken = function () {
  var value = uni.getStorageSync(phoneToken)
  return value
}

//手机号token
const setPhoneToken = function (value) {
  uni.setStorageSync(phoneToken, value)
}

//是否是总裁判长
const getJudge = function () {
  var value = uni.getStorageSync(judge)
  return value
}

//是否是总裁判长
const setJudge = function (value) {
  uni.setStorageSync(judge, value)
}

// 当前需要认证对比的考生
const setCurrentStudent = function (value) {
  uni.setStorageSync(currentStudent, value)
}
// 当前需要认证对比的考生
const getCurrentStudent = function (value) {
  var value = uni.getStorageSync(currentStudent)
  return value
}

//试题id
const getExaminationId = function () {
  var value = uni.getStorageSync(examinationId)
  return value
}

//试题id
const setExaminationId = function (value) {
  uni.setStorageSync(examinationId, value)
}

//截图
const getBase64Image = function () {
  var value = uni.getStorageSync(base64Image)
  return value
}

//截图
const setBase64Image = function (value) {
  uni.setStorageSync(base64Image, value)
}

//微信头像
const getAvator = function () {
  var value = uni.getStorageSync(avator)
  return value
}

//微信头像
const setAvator = function (value) {
  uni.setStorageSync(avator, value)
}

//用于微信绑定的
const getSocialId = function () {
  var value = uni.getStorageSync(wxSocialIdKey)
  return value
}

//设置安全高度
const setOffsetTop = function (value) {
  uni.setStorageSync(offsetTop, value)
}

//获取安全高度
const getOffsetTop = function () {
  var value = uni.getStorageSync(offsetTop)
  return value
}

//设置可视高度
const setOffsetHeight = function (value) {
  uni.setStorageSync(offsetHeight, value)
}

//获取可视高度
const getOffsetHeight = function () {
  var value = uni.getStorageSync(offsetHeight)
  return value
}

//设置上传视频路径
const setUplodVideoUrl = function (value) {
  uni.setStorageSync(uplodVideoUrl, value)
}

//获取上传视频路径
const getUplodVideoUrl = function () {
  var value = uni.getStorageSync(uplodVideoUrl)
  return value
}

//上传视频本地路径
const setTempFilePath = function (value) {
  uni.setStorageSync(tempFilePath, value)
}

//上传视频本地路径
const getTempFilePath = function () {
  var value = uni.getStorageSync(tempFilePath)
  return value
}

//设置针剂处方详情
const setInjectionInfo = function (value) {
  uni.setStorageSync(injectionInfo, value)
}

//获取针剂处方详情
const getInjectionInfo = function () {
  var value = uni.getStorageSync(injectionInfo)
  return value
}

//设置感兴趣的内容，如果没有登录或者登录了没有选择的情况下
const setChooseContent = function (value) {
  uni.setStorageSync(chooseContent, value)
}

//获取感兴趣的内容，如果没有登录或者登录了没有选择的情况下
const getChooseContent = function () {
  var value = uni.getStorageSync(chooseContent)
  return value
}

//微信的用于微信绑定的
const setSocialId = function (value) {
  uni.setStorageSync(wxSocialIdKey, value)
}

const clearUserMessage = function () {
  uni.setStorageSync(sidKey, "")
  uni.setStorageSync(userCodeKey, "")
  uni.setStorageSync(userKey, "")
  uni.setStorageSync(userIdKey, "")
}

const setActiveExport = function (value) {
  uni.setStorageSync(activeExport, value)
}

const getActiveExport = function () {
  var value = uni.getStorageSync(activeExport)
  return value
}

const setToNewUrl = function (value) {
  uni.setStorageSync(toNewUrl, value)
}

const getToNewUrl = function () {
  var value = uni.getStorageSync(toNewUrl)
  return value
}

const setPersonType = function (value) {
  uni.setStorageSync(personType, value)
}

const getPersonType = function () {
  var value = uni.getStorageSync(personType)
  return value
}
const setUploadVideoId = function (value) {
  uni.setStorageSync(uploadVideoId, value)
}

const getUploadVideoId = function () {
  var value = uni.getStorageSync(uploadVideoId)
  return value
}

const setVideoInfo = function (value) {
  uni.setStorageSync(videoIndo, value)
}

const getVideoInfo = function () {
  var value = uni.getStorageSync(videoIndo)
  return value
}


const setDownloadVideoList = function (value) {
  uni.setStorageSync(DownloadVideoList, value)
}

const getDownloadVideoList = function () {
  var value = uni.getStorageSync(DownloadVideoList)
  return value
}

const setAnalysisValue = function (value) {
  uni.setStorageSync(analysisValue, value)
}

const getAnalysisValue = function () {
  var value = uni.getStorageSync(analysisValue)
  return value
}

const setAnalysisDetailsValue = function (value) {
  uni.setStorageSync(analysisDetailsValue, value)
}

const getAnalysisDetailsValue = function () {
  var value = uni.getStorageSync(analysisDetailsValue)
  return value
}

const setQRInfo = function (value) {
  uni.setStorageSync(QRInfo, value)
}

const getQRInfo = function () {
  var value = uni.getStorageSync(QRInfo)
  return value
}

const setChooseInspectId = function (value) {
  uni.setStorageSync(chooseInspectId, value)
}

const getChooseInspectId = function () {
  var value = uni.getStorageSync(chooseInspectId)
  return value
}

const setExamTime = function (value) {
  uni.setStorageSync(examTime, value)
}

const getExamTime = function () {
  var value = uni.getStorageSync(examTime)
  return value
}


module.exports = {
  clearUserMessage,
  setSessionId, //登录的sid
  getSessionId,
  getUserCode, //登录账号的code
  setUserCode,
  setUser, //登录获取的用户info
  getUser,
  setAreaList, //获取地区列表
  getAreaList,
  getUserId, //用户id
  setUserId,
  getUserPhone, //用户手机号
  setUserPhone,
  setUserHospId, //用户医院id
  getUserHospId,
  getCcUserId, // 用户ccUserId
  setCcUserId,
  getWxOpenId, //微信openid
  getAvator, //微信头像
  setAvator, //微信头像
  getPhoneToken,
  setPhoneToken,
  setCurrentStudent,
  getCurrentStudent,
  getExaminationId,
  setExaminationId,
  getBase64Image,
  setBase64Image,
  getSocialId,
  setWxOpenId,
  setSocialId,
  setSocialId,
  setOffsetTop,
  getOffsetTop,
  setOffsetHeight,
  getOffsetHeight,
  setUplodVideoUrl,
  getUplodVideoUrl,
  setTempFilePath,
  getTempFilePath,
  setChooseContent,
  getChooseContent,
  setInjectionInfo,
  getInjectionInfo,
  setActiveExport,
  getActiveExport,
  setToNewUrl,
  getToNewUrl,
  setPersonType,
  getPersonType,
  setUploadVideoId,
  getUploadVideoId,
  setVideoInfo,
  getVideoInfo,
  setDownloadVideoList,
  getDownloadVideoList,
  setAnalysisValue,
  getAnalysisValue,
  setAnalysisDetailsValue,
  getAnalysisDetailsValue,
  setQRInfo,
  getQRInfo,
  setChooseInspectId,
  getChooseInspectId,
  setExamTime,
  getExamTime,
  setJudge,
  getJudge,
}
